<?php

/*
#------------------------------------------------------------------------
# memovie - February 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: support@gavick.com   
#------------------------------------------------------------------------ 
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
#------------------------------------------------------------------------
*/





defined('_JEXEC') or die('Restricted access');

$cparams = JComponentHelper::getParams ('com_media');

?>



<?php if ($this->params->get('show_page_title',1)) : ?>

<h1 class="componentheading<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

	<span><?php echo $this->escape($this->params->get('page_title')); ?></span>

</h1>

<?php endif; ?>



<?php if ($this->category->image || $this->category->description) : ?>

<div class="contentdescription<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">



	<?php if ($this->params->get('image') != -1 && $this->params->get('image') != '') : ?>

	<img src="<?php echo $this->baseurl .'/'. 'images/stories' . '/'. $this->params->get('image'); ?>" class="image_<?php echo $this->params->get('image_align'); ?>" alt="<?php echo JText::_( 'Contacts' ); ?>" />

	<?php elseif($this->category->image): ?>

	<img src="<?php echo $this->baseurl .'/'. 'images/stories' . '/'. $this->category->image; ?>" class="image_<?php echo $this->category->image_position; ?>" alt="<?php echo JText::_( 'Contacts' ); ?>" />

	<?php endif; ?>



	<?php echo $this->category->description; ?>



	<?php if (($this->params->get('image') != -1 && $this->params->get('image') != '') || $this->category->image) : ?>

	<div class="wrap_image">&nbsp;</div>

	<?php endif; ?>



</div>

<?php endif; ?>



<script language="javascript" type="text/javascript">

function tableOrdering( order, dir, task )

{

	var form = document.adminForm;



	form.filter_order.value	 = order;

	form.filter_order_Dir.value	= dir;

	document.adminForm.submit( task );

}

</script>



<form action="<?php echo $this->action; ?>" method="post" name="adminForm">



	<?php if ($this->params->get('display')) : ?>

	<div class="display">

		<?php echo JText::_('Display Num'); ?>&nbsp;

	</div>

	<?php endif; ?>



	<input type="hidden" name="catid" value="<?php echo (int)$this->category->id; ?>" />

	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />

	<input type="hidden" name="filter_order_Dir" value="" />



</form>



<table class="tablelist<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">



	<?php if ($this->params->get('show_headings')) : ?>

	<tr>

		<th id="Count" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JText::_('Num'); ?>

		</th>



		<?php if ($this->params->get('show_position')) : ?>

		<th id="Position" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JHTML::_('grid.sort', 'Position', 'cd.con_position', $this->lists['order_Dir'], $this->lists['order'] ); ?>

		</th>

		<?php endif; ?>



		<th id="Name" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JHTML::_('grid.sort', 'Name', 'cd.name', $this->lists['order_Dir'], $this->lists['order'] ); ?>

		</th>



		<?php if ($this->params->get('show_email')) : ?>

		<th id="Mail" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JText::_('Email'); ?>

		</th>

		<?php endif; ?>



		<?php if ( $this->params->get('show_telephone')) : ?>

		<th id="Phone" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JText::_('Phone'); ?>

		</th>

		<?php endif; ?>



		<?php if ($this->params->get('show_mobile')) : ?>

		<th id="mobile" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JText::_('Mobile'); ?>

		</th>

		<?php endif; ?>



		<?php if ( $this->params->get('show_fax')) : ?>

		<th id="Fax" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">

			<?php echo JText::_('Fax'); ?>

		</th>

		<?php endif; ?>

	</tr>

	<?php endif; ?>



	<?php echo $this->loadTemplate('items'); ?>

</table>



<p class="counter">

	<?php echo $this->pagination->getPagesCounter(); ?>

</p>



<?php echo $this->pagination->getPagesLinks(); ?>

